﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;
using Wolfut.MirageEE.Domain.CommonUtilities;

namespace Wolfut.MirageEE.Domain.Products
{
    /// <summary>
    /// 产品转换单明细信息 
    /// </summary>
    [ActiveRecord("PRODUCT_ASSEMBLY_ORDER_DETAILS")]
    public class ProductAssemblyOrderDetail : PersistentObjectWithGuid
    {
        #region 产品转换单ID
        private string productTransferBillID= string.Empty;
        /// <summary>
        /// 产品转换单ID
        /// </summary>
        [Property("PRODUCT_TRANSFORM_BILLS_ID")]        
        [ValidateNonEmpty, ValidateLength(0, 40, "产品转换单ID超长！")]
        public virtual string ProductTransferBillID
        {
            get
            {
                return productTransferBillID;
            }
            set
            {
                productTransferBillID = value;
            }
        }
        #endregion

        #region 子件编号
        private string subProductCode = string.Empty;
        /// <summary>
        /// 子件编号
        /// </summary>
        [Property("SUB_PRODUCTS_CODE")]
        [ValidateNonEmpty, ValidateLength(0, 100, "子件编号编号超长！")]
        public virtual string SubProductCode
        {
            get
            {
                return subProductCode;
            }
            set
            {
                subProductCode = value;
            }
        }
        #endregion

        #region 子件数量
        private Decimal subProductSum;
        /// <summary>
        /// 子件数量合计
        /// </summary>
        [Property("SUB_PRODUCTS_SUM")]
        public virtual Decimal SubProductSum
        {
            get
            {
                return subProductSum;
            }
            set
            {
                subProductSum = value;
            }
        }
        #endregion        

        #region 子件地点
        private string warehouseCode = string.Empty;
        /// <summary>
        /// 子件地点
        /// </summary>
        [Property("SUB_PRODUCTS_ADDRESS")]
        [ValidateLength(0, 100, "子件地点超长！")]
        public virtual string WarehouseCode
        {
            get
            {
                return warehouseCode;
            }
            set
            {
                warehouseCode = value;
            }
        }
        #endregion        

        #region 逻辑删除
        private Int16 isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Property("IS_DELETED")]
        public virtual Int16 IsDeleted
        {
            get
            {
                return isDeleted;
            }
            set
            {
                isDeleted = value;
            }
        }
        #endregion

        #region 存货地点（仓库ID）
        //[Property]
        //[ValidateLength(0, 40, "默认存货地点超长！")]
        //public virtual string ProductWarebasesID
        //{
        //    get
        //    {
        //        return productNo;
        //    }
        //    set
        //    {
        //        productNo = value;
        //    }
        //}
        #endregion
    }
}
